package com.project.common.constant;

import com.project.common.constant.HttpStatus;

/**
 * 响应状态码
 *
 * @Author: 汪焰
 * @Date: 2020/6/8 11:14
 **/
public enum ResultCode {

    SUCCESS(HttpStatus.SUCCESS, "success"),
    ERROR(HttpStatus.ERROR, "系统异常"),
    OSS_ERROR(HttpStatus.ERROR, "文件服务器异常"),
    ACCOUNT_ERROR(HttpStatus.FORBIDDEN, "登录失效，请重新登录"),
    ACCOUNT_NOT_PERMISSION(HttpStatus.UNAUTHORIZED, "没有权限访问该资源"),


    DATA_ERROR(5001001, "数据异常、参数校验不通过"),
    DATA_CHECK_ERROR(5001002, "数据校验异常"),
    EXPORT_DATA_ERROR(5001003, "导出异常"),


    ACCOUNT_NOT_EXIST(5002001, "账户不存在"),
    ACCOUNT_LOCK(5002002, "账户已锁定"),
    PASSWORD_ERROR(5002003, "密码错误"),

    ;
    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
